#dayupQ5(工作三天休息一天）
def dayUP(df):
    dayup = 1
    for i in range(365):
        if i%4 in [3,0]:
            dayup = dayup * (1 - 0.01)
        else:
            dayup=dayup*(1+df)
    return dayup


dayfactor = 0.01
while dayUP(dayfactor) < 37.38:
    dayfactor += 0.001
print("工作日的努力参数是:{:.3f}".format(dayfactor))


#dayupQ5(工作三天休息一天的前提下，努力一天提高1%，休息下降0.1%
）
def dayUP(df):
    dayup = 1
    for i in range(365):
        if i%4 in [3,0]:
            dayup = dayup * (1 - 0.001)
        else:
            dayup=dayup*(1+df)
    return dayup


dayfactor = 0.01
while dayUP(dayfactor) < 37.38:
    dayfactor += 0.001
print("工作日的努力参数是:{:.3f}".format(dayfactor))


#工作三天休息一天的前提下，努力一天提高1%，休息不下降
def dayUP(df):
    dayup = 1
    for i in range(365):
        if i % 4 == 3:  # 每4天中的第4天是休息日
            # 休息日不下降，因此dayup保持不变
            pass
        else:
            # 工作日努力提高1%
            dayup = dayup * (1 + df)
    return dayup
dayfactor = 0.01
while dayUP(dayfactor) < 37.38:
    dayfactor += 0.001
print("工作日的努力参数是:{:.3f}".format(dayfactor))